home *** CD-ROM | disk | FTP | other *** search
/ Trading on the Edge / Trading On The Edge - CD-ROM Toolkit (Wayzata Technology)(2031)(1994).bin / pc / mac_file / vendor_d / neuralwa / nw2v50 / art1.iif < prev    next >
Text File  |  1993-08-23  |  7KB  |  278 lines

  1. inst4.1
  2. !****************************************************************
  3. !*                                *
  4. !*    ART 1 Network Generator                    *
  5. !*                                *
  6. !****************************************************************
  7.  
  8. !    *** check that input / output PE count is non-zero
  9.  
  10. ?&In    1
  11. >bge    CheckOut
  12. @Err    "ART 1 MUST have at least one input PE"
  13. :CheckOut
  14. ?&Prt    1
  15. >bge    OutOK
  16. @Err    "ART 1 MUST have at least one F2 Layer PE"
  17. :OutOK
  18.  
  19. !    *** Load the Control Strategy and LRS if needed
  20.  
  21. ! Create the LR Schedule
  22. @NLRS    "art1"            !New LR schedule
  23. =rsta    10000            !Max recall count
  24. =ArrX    3            !(Mod Factor)
  25. =rcfa    A1Vg            !Vigilance
  26. =rcft    "Vigilance"
  27. =ArrX    1            !Index coefficient 1
  28. =lcfa    A1LR            !Learning Rate
  29. =lcft    "Learning Rate"
  30. =ArrX    2            !Index coefficient 2
  31. =lcfa    A1Ch            !Choice Parameter (L)
  32. =lcft    "Choice Param." 
  33. @SLRS                !Save LRS to directory
  34.  
  35. @LdCS    "art1"            !control strategy
  36.  
  37. =netn    "InstaNet (tm) ART 1 Network version 4.10 Sept-92"
  38. =DLnF    0            !learn  re-display off
  39. =DRcF    0            !recall re-display off
  40.  
  41. !    *** Build the Input Layer ***
  42.  
  43. @LLdf                !load default layer to mi_layer structure
  44. =LDln    "Input"            !layer name
  45. =Lpes    &In            !copy # of input PEs from menu
  46. =Ltrn    "StepFunction"        !transfer function
  47. =x    150            !place to put layer on screen
  48. =y     40
  49. #Incl    "stdnwgtf.iif"        !standard # weight fields
  50. @LAdd                !add the input layer
  51.  
  52. !  *** Build the Input Size layer and connect to Input layer ***
  53.  
  54. @LLdf                !start with default layer again
  55. =LDln    "IP Sum"        !layer name
  56. =Lpes    1            !desired number of PEs
  57. =x    100
  58. +y    30            !up higher on display
  59. #Incl    "stdnwgtf.iif"        !standard # weight fields
  60. @LAdd
  61. =NPEl    0            !input layer
  62. @NrPE
  63. =SPEl    LayN            !current layer
  64. @SlPE
  65. =cnwt    1.0            !connection weight
  66. =cnty    WFix            !fixed connections
  67. =cnsc    WAbs            !absolute
  68. @LCFl                !connect fully
  69. =n0    LayN            !track Input Size layer
  70.  
  71. ! *** Build the Input Active layer and connect to Input size layer ***
  72.  
  73. @LLdf                !start with default layer again
  74. =LDln    "IP Active"        !layer name
  75. =Lpes    1            !desired number of PEs
  76. =Ltrn    "StepFunction"        !transfer function
  77. =x    100
  78. +y    30            !up higher on display
  79. #Incl    "stdnwgtf.iif"        !standard # weight fields
  80. @LAdd
  81. =NPEl    n0            !input size layer
  82. @NrPE
  83. =SPEl    LayN            !current layer
  84. @SlPE
  85. @LCFl                !connect fully
  86. =n1    LayN            !track Input Active layer
  87.  
  88. !    *** Build the F2 Active layer ***
  89.  
  90. @LLdf                !start with default layer again
  91. =LDln    "F2 Active"        !layer name
  92. =Lpes    1            !desired number of PEs
  93. =Ltrn    "StepFunction"        !transfer function
  94. =x    50
  95. +y    30            !up higher on display
  96. #Incl    "stdnwgtf.iif"        !standard # weight fields
  97. @LAdd
  98. =n2    LayN            !track F2 Active layer
  99.  
  100. ! *** Build the Gain Control layer and connect to active layers ***
  101.  
  102. @LLdf                !start with default layer again
  103. =LDln    "Gain Control"        !layer name
  104. =Lpes    1            !desired number of PEs
  105. =Ltrn    "StepFunction"        !transfer function
  106. =x    100
  107. +y    30            !up higher on display
  108. #Incl    "stdnwgtf.iif"        !standard # weight fields
  109. @LAdd
  110. =SPEl    LayN            !current layer
  111. @SlPE
  112. =NPEl    n1            !input active layer
  113. @NrPE
  114. @LCFl                !connect fully
  115. =NPEl    n2            !input active layer
  116. @NrPE
  117. =cnwt    -1.0            !connection weight
  118. @LCFl                !connect fully
  119. =n1    LayN            !track Gain Control layer
  120.  
  121. ! *** Build F1 layer and connect to input, gain control and bias ***
  122.  
  123. @LLdf                !start with default layer again
  124. =LDln    "F1"            !layer name
  125. =Lpes    &In            !desired number of PEs
  126. =Ltrn    "StepFunction"        !transfer function
  127. =Llrn    "ART 1"            !learning rule
  128. =LInL    1.0            !low initialization limit
  129. =LInH    1.0            !high initialization limit
  130. =x    150            !place to put layer on screen
  131. +y    30            !up higher on display
  132. #Incl    "stdnwgtf.iif"        !standard # weight fields
  133. @LAdd
  134. =SPEl    LayN            !current layer
  135. @SlPE
  136. =NPEl    -1            !bias layer
  137. @NrPE
  138. =cnwt    -1.5            !connection weight
  139. @LCFl                !connect fully
  140. =NPEl    0            !input layer
  141. @NrPE
  142. =cnwt    1.0            !connection weight
  143. @LCCr                !connect correspondingly
  144. =NPEl    n1            !gain control layer
  145. @NrPE
  146. @LCFl                !connect fully
  147. =n1    LayN            !track F1 layer
  148.  
  149. !  *** Build the Vigilance layer and connect to Input Size layer and bias ***
  150.  
  151. @LLdf                !start with default layer again
  152. =LDln    "Vigilance"        !layer name
  153. =Lpes    1            !desired number of PEs
  154. =Lsum    "Product"        !summation function
  155. =x    50
  156. +y    30            !up higher on display
  157. #Incl    "stdnwgtf.iif"        !standard # weight fields
  158. @LAdd
  159. =SPEl    LayN            !current layer
  160. @SlPE
  161. =NPEl    n0            !Input Size layer
  162. @NrPE
  163. @LCFl                !connect fully
  164. =NPEl    -1            !Bias
  165. @NrPE
  166. =cnty    WMod            !Modifiable connection
  167. @LCFl                !connect fully
  168. =n0    LayN            !track Vigilance layer
  169.  
  170.  
  171. !  *** Build the F1 Size layer and connect to F1 layer ***
  172.  
  173. @LLdf                !start with default layer again
  174. =LDln    "F1 Sum"        !layer name
  175. =Lpes    1            !desired number of PEs
  176. =x    100
  177. +y    30            !up higher on display
  178. #Incl    "stdnwgtf.iif"        !standard # weight fields
  179. @LAdd
  180. =NPEl    n1            !F1 layer
  181. @NrPE
  182. =SPEl    LayN            !current layer
  183. @SlPE
  184. =cnty    WFix            !fixed connections
  185. @LCFl                !connect fully
  186. =n3    LayN            !track F1 Size layer
  187.  
  188. !  *** Build Reset layer and connect to F1 layer ***
  189.  
  190. @LLdf                !start with default layer again
  191. =LDln    "Reset"            !layer name
  192. =Lpes    1            !desired number of PEs
  193. =Ltrn    "StepFunction"        !transfer function
  194. =x    50
  195. +y    30            !up higher on display
  196. #Incl    "stdnwgtf.iif"        !standard # weight fields
  197. @LAdd
  198. =SPEl    LayN            !current layer
  199. @SlPE
  200. =NPEl    n0            !Vigilance layer
  201. @NrPE
  202. =cnty    WFix            !Fixed connection
  203. @LCFl                !connect fully
  204. =NPEl    n3            !F1 size layer
  205. @NrPE
  206. =cnwt    -1.0            !connection weight
  207. @LCFl                !connect fully
  208. =n0    LayN            !track Reset layer
  209.  
  210. ! *** Build F2 layer and connect to reset layer ***
  211.  
  212. @LLdf                !start with default layer again
  213. =LDln    "F2"            !layer name
  214. =Lpes    &Prt            !desired number of PEs
  215. =Lcmp    "One-Active-Highest"    !output function
  216. =Llrn    "ART 1"            !learning rule
  217. =LInL    0.0            !low initialization limit = 0.0
  218. =LInH    1.0            !high initialization limit
  219. /LInH    &In            ! = 1.0/M
  220. =x    150            !place to put layer on screen
  221. +y    30            !up higher on display
  222. #Incl    "stdnwgtf.iif"        !standard # weight fields
  223. @LAdd
  224. =SPEl    LayN            !current layer
  225. @SlPE
  226. =NPEl    n0            !Reset layer
  227. @NrPE
  228. =cnty    WSet            !Fixed connection
  229. =cnwt    1.0            !connection weight
  230. @LCFl                !connect fully
  231. =n0    LayN            !track F2 layer
  232.  
  233. !    *** Connect F2 layer to the F2 active layer ***
  234.  
  235. =SPEl    n2            !F2 active layer
  236. @SlPE
  237. =NPEl    n0            !F2 layer
  238. @NrPE
  239. =cnty    WFix            !Fixed connection
  240. =cnwt    1.0            !connection weight
  241. @LCFl                !connect fully
  242.  
  243. !    *** Connect F1 and F2 layers ***
  244.  
  245. =cnwt    1.0
  246. =cnty    WVar            !variable so they can "learn"
  247. =SPEl    n0            !F2 layer
  248. @SlPE
  249. =NPEl    n1            !F1 layer
  250. @NrPE
  251. @LCFl                !Bottom Up connections
  252. =SPEl    n1            !F1 layer
  253. @SlPE
  254. =NPEl    n0            !F2 layer
  255. @NrPE
  256. @LCFl                !Top Down Connections
  257. !    *** Select Control Strategy & L/R Schedule ***
  258.  
  259. @LLsl                !load super layer
  260. =Lctl    "art1"            !control strategy
  261. =Llrs    "art1"            !L/R Schedule
  262. =Llnn    "art1"            !name of learn input
  263. =Lrcn    "art1"            !name of recall output
  264. #Incl    "stdioset.iif"        !standard I/O settings
  265. +Lflg    LAAs            !auto-associative network
  266. =Lscl     0            !input  low-value
  267. =Loff     1            !input  high-value
  268. =Llow     0            !output low-value
  269. =Lhgh     1            !output high-value
  270. =Lax1    Epch            !epoch size
  271. @SVsl                !save it back
  272. !
  273. =Grph     1
  274. =GrLF    "art1"            !instrument list file
  275.  
  276. @Nini                !initialize the network
  277. @EOF
  278.